﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace EasySL.Controls
{
    public class ExPropertyGroupDescription : PropertyGroupDescription
    {
        public ExPropertyGroupDescription(string propertyName)
            : base(propertyName)
        {
        }

        public override object GroupNameFromItem(object item, int level, CultureInfo culture)
        {
            var dataRow = item as DataRow;
            return dataRow[PropertyName];
        }

        public override bool NamesMatch(object groupName, object itemName)
        {
            return base.NamesMatch(groupName, itemName);
        }
    }
}